$(window).load(function(){
	/* 初始获取用户信息 */
	var urlGetPersonInfo = wxAddress+"/weixin/user/getPersonInfo";
	ajaxEncapsulation(urlGetPersonInfo, getPersonInfoSucFn, "", "GET", "true");
	function getPersonInfoSucFn(data){
		if(data.code == "0000"){
			var introMsg = data.data;
			var text = $('<img class="info-back" src="images/info-back.png" /><img class="info-img" src="'+introMsg.headimgurl+'" />'+
				'<p>'+introMsg.nickname+'</p>');
			text.appendTo($(".info-msg"));
		}else {
			warnText($(".red-bg"),"获取用户信息失败！",1000);
		}
	}
	

	
	/* 点击菜单对应处理 */
	$(".info-text li").on("click", function(){
		var index = $(this).index();
		if(index == 0){
			window.location.href = "selforder.html";
		}else if(index == 1){
			alert("客户管理");
		}else if(index == 2){
			alert("地址管理");
		}else if(index == 3){
			alert("绑定手机");
		}
	})
});